#7-1
# lend = input("hello, what kind of cars do you like? ")
# print("ok, let me see if i can find you a " + lend +".")
#7-2
# customers = input("how many people will you arrive? ")
# customers = int(customers)
# if customers > 8:
# print("i'm so sorry, we don't have enough seats right now.")
# else:
# print("good, when will you come here?")
#7-3
# num = "enter a number, and i'll tell you "
# num +="if it's Integer multiples of ten: "
# nums = input(num)
# nums = int(nums)
# if nums % 10 == 0:
# print("yes")
# else:
# print("change another one.")
#7-4
# while True:
    # toppings = input("what would you like to add? ")
    # if toppings =="quit":
        # break
    # print("we will add this.")
#7-5
# question = "how old are you? "
# active = True
# while active:
    # age = input(question)
    # age = int(age)
    # if age < 3:
        # print("the ticket is free.")
    # elif age <= 12:
        # print("the ticket is 10 dollors.")
    # else:
        # print("the ticket is 15 dollors.")
#7-7
# vegetable = ["potato"]
# while "potato" in vegetable:
    # print(vegetable)
    # vegetable.append(vegetable)
#7-8
# sandwich_orders = ["wrist", "chicken", "lamp"]
# finished_sandwiches = []
# while sandwich_orders:
#     sandwich_made = sandwich_orders.pop()
#     print("i made your " + sandwich_made)
#     finished_sandwiches.append(sandwich_made)
# print(finished_sandwiches)
#7-9
# sandwich_orders = ["wrist","pastrami","chicken","pastrami", "lamp","pastrami"]
# while "pastrami" in sandwich_orders:
#     sandwich_orders.remove("pastrami")
# print("the pastrami in store has sold out")
# print(sandwich_orders)
#7-10
prompt1 = "\nwhat's your name? "
prompt2 = "\nif you could visit one place in the world, where would you go? "
results = {}
the_survey = True
while the_survey:
    name = input(prompt1)
    place = input(prompt2)
#这里首先括号里的是变量，并不代表某一个确定的元素，其次字典中，name是键，place是值
    results[name] = place
    repeat = input("\nwould you like to invite another one to make this survey? (yes/no) ")
    if repeat == "no":
        the_survey = False
        print("\nthank you for answering.")
print("-----the survey-----")
for n,p in results.items():
    print("\n" + n + " would go to " + p + ".")


    


